package org.aplombh.java.interview.newcoder;

import java.util.Scanner;

public class HJ23_删除字符串中出现次数最少的字符 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNextLine()) {
            String str = in.nextLine();
            int[] chars = new int[26];
            int min = 20;
            for (int i = 0; i < str.length(); i++) {
                chars[str.charAt(i) - 'a']++;
            }
            for (int i = 0; i < 26; i++) {
                if (chars[i] != 0 && chars[i] < min)
                    min = chars[i];
            }
            for (int i = 0; i < 26; i++) {
                if (chars[i] == min) {
                    str = str.replaceAll((char) (i + 'a') + "", "");
                }
            }
            System.out.println(str);
        }
    }
}
